package com.ifugle.rap.application.service;

import java.util.List;
import com.ifugle.rap.application.api.UserToolApi;
import com.ifugle.rap.application.mapper.UserToolMapper;
import com.ifugle.rap.application.model.UserTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserToolService implements UserToolApi {

    @Autowired
    UserToolMapper userToolMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userToolMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(UserTool record) {
        return userToolMapper.insert(record);
    }

    @Override
    public int insertSelective(UserTool record) {
        return userToolMapper.insertSelective(record);
    }

    @Override
    public UserTool selectByPrimaryKey(Long id) {
        return userToolMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<UserTool> selectByUserId(Long userId) {
        return userToolMapper.selectByUserId(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(UserTool record) {
        return userToolMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserTool record) {
        return userToolMapper.updateByPrimaryKey(record);
    }

    @Override
    public UserTool selectByUserIdAndToolId(Long userId, Long toolId) {
        return userToolMapper.selectByUserIdAndToolId(userId,toolId);
    }
}
